<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>设置子元素侧轴上的排列方式</title>
    <style>
        div {
            display: flex;
            width: 80%;
            height: 300px;
            background-color: pink;
            /* 设置主轴方向 */
            flex-direction: row;
            /* flex-direction: column; */
            /* 设置主轴的排列方式 */
            /* 换行 */
            flex-wrap: wrap;
            justify-content: center;
            /* 设置侧轴的排列方式 */
            align-content: space-around;


        }

        span {
            width: 20%;
            height: 100px;
            background-color: skyblue;
            margin: 10px;
        }
    </style>
</head>

<body>
    <div>
        <span>1</span>
        <span>3</span>
        <span>5</span>
        <span>7</span>
        <span>9</span>
        <span>13</span>
        <span>15</span>
        <span>17</span>
    </div>
</body>

</html>